HTML Pro will display your documents almost as they will look when seen with a web browser, such as Netscape or Mosaic. Some differences exists, partly because I didn't want to create an entire word processing program (I'm a ShareWare writer, not the Microsoft corporation), partly so that the program will run faster and more smoothly.
The differences are explained more thoroughly in the following sections.
HTML Pro is part of the Niklas Frykholm Shareware package - a great concept. By paying a registration fee of $5 you will become a registered owner of the entire package. This includes every program I've ever written together with every program I might ever write in the future. If you have an e-mail address I will mail you new versions and programs when they are done.
Send the money (just put it in an envelope, unfortunately this is still the best way of sending small sums of money from one country to another) together with your name and address to:
Niklas Frykholm
If you have any comments about this program, you can e-mail me at:
Information about this program (current version, etc) and the other programs in the Niklas Frykholm ShareWare Package can be found at my home page:
HTML files are ordinary text files together with tags that tell the computer how to format the text. Tags are generally written <Start tag>Affected text</End tag> or sometimes just <Single tag>. So to make a word bold you would mark it like <B>this</B> and it would appear like this.
To create special characters in the text such as å ä ö, escape sequences are used. An escape sequence starts with a & and ends with a ;. To create an å in your text you would write å
Entering strange key combinations like those above is not very Macintoshish (or whatever) and that's why you need HTML Pro! HTML Pro let's you work with HTML documents as if you were doing ordinary word processing. Instead of entering å you simply type an å on your keyboard. Instead of writing <B> </B> you select bold from the menu or press command-B on your keyboard.
HTML Pro uses two editing windows. One window, titled "Source", shows the source text, and the other one, titled "HTML", shows the formatted text. While you'll probably use the HTML window most of the time, you may want to switch to the Source window temporarily to do some "bit flickering" or just to "see how it is done".
The document can be edited in both windows and all menu options - such as copying, pasting, formatting text, etc, etc apply in both windows. To switch between the two windows you can use the View menu or simply click on the window you want to switch to.
To create styled text, just select some text in your document and choose an option from the Styles menu. You can also choose an option directly from the Styles menu. Then when you start to type that style will automatically be used. If you've styled text to the very end of the document it can sometimes be hard to get past the styled text. To do this, switch to the source window, position the cursor at the very end of the text - after all tags, still in the source window type a character and then switch back to the HTML window.
The different styles that can be used in a document are described below.
Emphasis
Displays the text with emphasis. This is usually done with italics.
Strong
Displays the text with strong emphasis. This is usually done in boldface.
Code
Marks the text as code. This generally means using some fixed-width style, such as Courier or Monaco.
Keyboard
Marks the text as something that should be entered on the keyboard. Keyboard text is usually displayed in a fixed-width font.
Variable
Marks the text as a variable. Variables are usually displayed in italics.
Definition
Marks the text as a definition.
Citation
Marks the text as a citation. Citations are usually displayed in italics.
PreformattedMarks the text as having been preformatted in some way. Usually displayed in a fixed width font. Note that the way HTML Pro handles preformatted text differs from the way most web browser handles it. Return characters in the source text are generally not significant, but in preformatted text they should be. HTML Pro, however, does not recognise return characters even in preformatted text, you'll have to use <P> and <BR> tags instead (The reason for this is purely technical). The same applies to the Plain Text tag. There are some ways to work around this problem, for example you can avoid using the preformatted tag, or you can use the preformatted tag and use <P> and <BR> for line feeds (this won't work with the Plain Text tag), or you can use the source window for editing preformatted text and ignore the fact that the HTML window is getting mucked up.
Plain Text(Preformatted shown instead)
BlockquoteMarks a section of the text as quoted from some other source. Blockquotes are generally displayed slightly indented (although they will not show up this way with HTML Pro).
Sample
Marks a section of the text as sample output
Paragraph break
Inserts a paragraph break in the HTML window. Note that line break and paragrah break tags are inserted automatically when you press the return key in the HTML window, so there is little use for this tag.
Line break
Inserts a line break in the HTML window.
Horizontal line
Title (Not shown)
This marks the selected text as being the title of the document. With web browsers, the title of the document is often displayed in the title bar of the document's window. In HTML Pro the surrounding text [TITLE: ] indicates that some text should be considered a title.
If you apply a style to the same selection twice, the effect is to remove the style. Note that for this to happen you must apply the style to exactly the same selection. It is in other words not possible to "unbold" just a part of a bold sentence. It's all or nothing. If you want to partially remove a style using Remove All Tags described in the section on the Edit menu and then reapplying the style is probably the best choice of action.
Also note that nesting tags, in a manner like this: <B>some <I> nested </B> tags </I> is not recommended. It works most of the time, but you may eventually run into problems either with HTML Pro or with a web browser.
An unordered list displays the items without order, usually preceeded by a bullet.
An ordered list displays the items in order assigning an ordinal number to each item, starting with 1.
A definition list consists of terms followed by definitions or explanations. The terms are usually displayed in boldface and the explanations slightly indented.
A menu list is the preferred choice when the list is to act as an interactive menu.
A directory list is the preferred choice when the list represents files on some media.
When creating the list the computer will look for line break and paragraph break tags and convert them to list tags, so the different items in the list should be separated by line breaks. Like this:
Sweden
Norway
Finland
Now the text above could be selected and made into a list by using one of the list options above. We can make it into an unordered list:
Luke Skywalker
Luke Skywalker is the last of the Jedi Knights.
Bill Clinton
Bill Clinton is the president of the United States.
It will appear as:
The Other Document option implements this feature. Select the text you want to make into a link and choose Other Document from the Links submenu. A dialog will pop up that allows you to enter the URL of the document that the link points to.
An URL (uniform resource locator) is a way of telling a browser exactly where to find a specific file. If the file is in the same directory as the file with the link, the URL is simply the name of the file. If the file is located in a subdirectory, unix naming conventions are used, so "mail/letters.txt" would indicate the "letters.txt" file located in the "mail" directory situated in the current directory. Note that to move to the parent directory two dots are used so "../index.html" would specify the file "index.html" in the parent directory of the current directory.
If the file is located on another server using relative path names (like the ones above) is not recommendable. Instead you have to specify the name of the server and in what directories/subdirectories the file is located. An absolute path name often starts with the protocol that is used. For hyper text documents the protocol is http (hyper text transfer protocol). So the URL for my home page is:
http://www.ts.umu.se/~r2d2/index.html
Note the structure:
protocol://web_server/directory/filename
It is also possible to create tags that will bring you to a specific part of a document. To do that, first create the anchor that you want the link to point to. Select some text and choose Tag from the Links submenu. Enter whatever you like in the dialog box that pops up. The only thing that's important is that no two anchors have the same identification string.
To create a link to the anchor choose the This Document option from the Links submenu and enter the identification string of the tag you want to link to.
You can also link to a specific part of another document. In that case use the syntax:
URL#tag_name
in the Ohter Document dialog box.
The Image link will include an inline image (in Compuserve GIF format) in your document. Enter the URL of the image you want to include. HTML Pro cannot display the images, it will just show the text [IMAGE] to indicate that there should be an image at that position. You can enter an alternate text when you create an image. If you do, that text will appear on browsers that are unable to show images.
The Mail To link will include a mailto tag in your document. With some browsers - if you click on a mailto tag you will be able to send mail to the linked e-mail address.
Cutting, copying and pasting with HTML Pro works as you're used to. You can cut text from HTML Pro and paste it into some other word processing program or vice versa. Note that when you paste text from some other source into HTML Pro the styles will be removed. It would be nice if the program could convert the styles in the text to the corresponding HTML tags, but unfortunately it can't. Also note that when you paste something to the source window the computer will assume that what you're pasting is "source text", and thus will not replace strange characters with there escape sequences, line feeds with <BR> tags, etc...
The option Remove All Tags will remove all tags in the selection (save for the <P> and <BR> tags, otherwise the document would get in a terrible mess). You will find Remove All Tags useful if a part of your document has been cluttered with different styles. It is especially useful with lists. If you want to add an item to a list one of the best ways is to select the entire list, choose Remove All Tags, add the item and then reapply the list style. (Another way is to go into the source text and do some bit-flickering.)
The option Update HTML will recreate the styled text in the HTML window based on the current source code. Since the program continuosly updates the HTML view you should never have to use this option. It might be however, that there is some unforeseen bug in the program that clutters up the HTML view. In that case this option can be a last resort.
Selecting Find will bring up a Find/Replace dialog that will seem familiar to you from many other applications. This Find/Replace version is somewhat crippled. The dialog box is not moveable and there are no Whole Words or Match Case features. If I feel like it, I might improve it in the future.
Thus the program must be able to differ between ordinary text files and HTML files (which are also a kind of text files). Below I will explain how this is done.
To start with, the program checks the file name. If it ends in .txt the file is assumed to be a text file, if it ends in .html the file is assumed to be an HTML file. If the file name test isn't decisive the program examines the file. It looks for character combinations such as </ which are commonplace in HTML files but extremely rare in ordinary text files. It also looks for special characters, such as å, ä and ö, which can exist in text files but never in HTML-files. If this test isn't enough to determine the type of the file a dialog box will be presented where the user is allowed to specify the file type.
The current version of HTML Pro can only work with one file at a time, so if you open a new file you automatically close the previous one. This might change in future versions.
If the Source window is frontmost when you choose PrintŠ the source text will be printed. If the HTML window is frontmost, the styled text will be printed. PrintŠ will automatically set the margins of the text. If you wish for greater control over how the printed text
will appear I suggest you paste the entire text into some other word processing program.
While HTML Pro supports the most useful tags there are plenty of tags that the program is not aware of. How do you go about then if you want to use such tags in your HTML Pro document. Do you have to switch to the Source window and enter the tags manually? Luckily not.
HTML Pro allows you to define Macros for these purposes. When you choose Add MacroŠ from the Macros menu a dialog box will appear that allows you to specify the name of the macro, the start tag and the end tag. Let's say you want to create a macro to implement the center tag, which centers a part of the text. Then you might enter something like this:
Macro name: Center
Start tag: <CENTER>
End tag: </CENTER>
Now the name Center will be appended to the Macros menu. If you select some text and choose Center from the Macros menu the text will be surrounded by <CENTER> </CENTER> tags causing it to display centered with some browsers.
To remove a macro use the Remove Macro submenu and select the macro you want to remove.
Your macros will be saved automatically to a file called "HTML Pro Macros" in the Preferences folder in your System folder. If the program for some reason is unable to write to this file you will receive an error message.
Naturally you can create macros for other things than tags. You might want to create a macro for your e-mail address so that it's simple to include it in your document. I myself has found this particular macro useful:
Name: Mail me
Start tag: <A HREF="mailto:nisfrm95@student.umu.se">
End tag: </A>
which links some text to my mailbox without bringing up the Mail To dialog box. Note that macros are inserted in the Source text, therefore if you use special characters, like å, ä and ö in a Macro you should always use their escape sequences, å and so on. Otherwise you are asking for trouble.
Note that there's a limit on 50 macros.
The Preferences dialog box lets you control several characteristics of your HTML Pro working environment. The Preferences are divided into three different sections: General, Compability and Helpers. Clicking on the icon of a section will take you to that section.
In the General section you can specify the size and font of the text in the source window. You can also specify the number of documents to save in the Recent menu (see chapter 12). The "Open document at startup" specifies a document that will be opened automatically when you start the program. To select a default document press the Browse button and select a file. If you press Cancel in the standard file dialog box, the computer will interpret it as if you don't want to use a default document.
The Compability section lets you set some options that are important when moving doucments across machines. HTML Pro will automatically convert Unix and MS-DOS line endings and if you want to, you can specify an additional line ending to be understood by the computer. You can also specify which kind of line ending you wish to use when saving documents.
The Helpers section lets you select the applications you want to use for viewing GIF images, listening to AIFF sounds, etc. If you select the option "Always use file's creator" HTML Pro will ignore the helpers you have chosen and always try to display an image with the program that created it.
Your preferences will be saved to a file called "HTML Pro Prefs" in the preferences folder.
If the file is not an HTML file, HTML Pro will launch an application that allows you to see the file. This is either the application that created the program or an application set in the Preferences dialog box to be a "helper" for the file type.
Similarily if you command-click on an [IMAGE] tag in your document your preferred GIF viewer will automatically be launched.
Related to these features is the "Launch Browser" option in the View menu. When you select that option the file you're editing with HTML Pro will automatically be opened and displayed by your specified browser, Netscape, Mac Web, or something else. This allows you to view the file exactly as it will be displayed, with inline images, etc... It also allows you to test your remote links if you're connected to the internet.
The recent menu will be saved in the file "HTML Pro Recent" in your preferences folder.
Niklas Frykholm, 950228